﻿using Learun.Util;
using SqlSugar;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.Scheduler
{
    /// <summary>
    /// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
    /// Copyright (c) 2013-2018 Hexagon PPM
    /// 创 建：超级管理员
    /// 日 期：2019-08-13 11:16
    /// 描 述：任务调度
    /// </summary>
    [SugarTable(TableName = "JOB_SCHEDULE")]
    public class Job_ScheduleEntity 
    {
        #region 实体成员
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
        public string id { get; set; }
        /// <summary>
        /// 任务名
        /// </summary>
        [SugarColumn(ColumnName = "JOBNAME")]
        public string JobName { get; set; }
        /// <summary>
        /// 任务分组
        /// </summary>
        [SugarColumn(ColumnName = "JOBGROUP")]
        public string JobGroup { get; set; }
        /// <summary>
        /// 运行状态
        /// </summary>
        [SugarColumn(ColumnName = "RUNSTATUS")]
        public string RunStatus { get; set; }
        /// <summary>
        /// Crom表达式
        /// </summary>
        [SugarColumn(ColumnName = "CROMEXPRESS")]
        public string CromExpress { get; set; }
        /// <summary>
        /// 任务别名
        /// </summary>
        [SugarColumn(ColumnName = "ALIASNAME")]
        public string AliasName { get; set; }
        /// <summary>
        /// 任务目标类
        /// </summary>
        [SugarColumn(ColumnName = "TASKCLASS")]
        public string TaskClass { get; set; }
        /// <summary>
        /// Description
        /// </summary>
        [SugarColumn(ColumnName = "DESCRIPTION")]
        public string Description { get; set; }
        #endregion

        #region 扩展操作
        /// <summary>
        /// 新增调用
        /// </summary>
        public void Create()
        {
            this.id = Guid.NewGuid().ToString();
        }
        /// <summary>
        /// 编辑调用
        /// </summary>
        /// <param name="keyValue"></param>
        public void Modify(string keyValue)
        {
            this.id = keyValue;
        }
        #endregion
        #region 扩展字段
        #endregion
    }
}

